home *** CD-ROM | disk | FTP | other *** search
- % -----------------------------------------------------------------------------
- % Extract all DeviceResultStr messages *TERMINATE PRESCRIPTION*
- % -----------------------------------------------------------------------------
- %
- % Version : 1.00
- % Filename : ERRORMSG.TSL
- % Company : SerWiz Comm
- % Programmer : Bo Bendtsen
- % Module created : 07 Aug 1995
- % Latest revision : 07 Aug 1995
- % Language/version : Terminate Prescription 1.00
- % Remarks : Demonstration script, timer, textfile, error messages
- %
- % -----------------------------------------------------------------------------
-
- ClearScreen
- Window 1,1,80,20,6,0,23,23,27," Extracting error messages "
- WriteAStr 2,0,31," Esc to Abort "
- SetAttr 23
-
- OpenText 1,"ERRORMSG.TXT",1
-
- ResetTimer 1,60
- Set X=0
- Repeat
- Set Error=DeviceResultStr(x)
- If Pos("Unknown error code",Error)=0
- WriteLnText 1," ",X," : ",Error
- PrintLn " ",X," : ",Error
- Endif
- Set X=X+1
- Until (X>10000) | (Keypressed=1)
-
- CloseText 1
-
- PrintLn
- PrintLn " Done, ERRORMSG.TXT was created"
- PrintLn " Time used ",Round(TimeElapsed(1)/1000)," seconds"
-
- Set Key=GetKey
-
- RemoveWindow
-
-